﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XProject.DataVisit.Model.Flow
{
    public class FlowRecord:IProjectModel
    {
        public virtual Guid PID { get; set; }
        /// <summary>
        /// 流程ID
        /// </summary>
        public virtual Guid FlowID { get; set; }
        /// <summary>
        /// 人员ID
        /// </summary>
        public virtual Guid PersonID { get; set; }
        /// <summary>
        /// 节点ID
        /// </summary>
        public virtual Guid NodeID { get; set; }
        /// <summary>
        /// 外键ID
        /// </summary>
        public virtual string ContentID { get; set; }
        /// <summary>
        /// 审批说明
        /// </summary>
        public virtual string Remark { get; set; }

        public virtual DateTime LastUpdate { get; set; }

        #region 重写Hash和Equals
        public override int GetHashCode()
        {
            return PID.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            var temp = obj as FlowRecord;
            if (temp == null) return false;
            return temp.PID == this.PID;
        }
        #endregion
    }
}
